// pages/news-detail/news-detail.js
const newList = require('../../static/news-data.js')

Page({
  data: {
    newslist:newList.newsData,
    newsDetail: {}
  },
  onLoad (options) {
    const i = options.index
    console.log(i)
    console.log(newList.newsData[i])
    this.setData({
      newsDetail: this.data.newslist[i]
    })
  }
})